﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Webform2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(Session["login"].ToString() != "yes")
        {
            Response.Redirect("Webform1.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Write("登录成功");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        //Session["login1"] = "yes";
        //Response.Redirect("Webform1.apsx");
        Session["login"] = "no";
    }
}